﻿using System;

namespace DL.AI.AIBT
{
    //逆变器
    public class Inverter : BTNode
    {
        public Inverter(string name, int priority = 0) : base(name, priority)
        {
        }

        public override Status Process()
        {
            switch (Children[0].Process())
            {
                case Status.Failure:
                    return Status.Success;
                case Status.Running:
                    return Status.Running;
                default:
                    return Status.Failure;
            }
        }
    }
}